#include <objects/CameraSegurancaIsmalia.h>
#include <gllib/Objects.h>
#include <GL/glu.h>
#include <GL/gl.h>

void CameraSegurancaIsmalia::draw()
{
//Corpo da câmera
    glPushMatrix();
    glColor3f(0.5,0.5,0.5);
    glTranslatef(-0.7,0.4,0.0);
    glRotatef(20.0,1.0,0.0,0.0);
    glScalef(0.2,0.25,0.4);
    gllibCube(5.0);
    glPopMatrix();

//Lente da câmera
    glPushMatrix();
    glColor3f(0.0,0.0,0.0);
    glTranslatef(-0.70, 0.025, 1.15);
    glRotatef(90.0,1.0,0.0,0.0);
    glRotatef(20.0,1.0,0.0,0.0);
    glScalef(0.2, 0.25, 0.4);
    gllibCylinder(1.25,1.0,10.0);
    glPopMatrix();

//Envoltório da lente
    glPushMatrix();
    glColor3f(0.7,0.7,0.7);
    glTranslatef(-0.70, 0.025, 1.15);
    glRotatef(90.0,1.0,0.0,0.0);
    glRotatef(20.0,1.0,0.0,0.0);
    glScalef(0.2, 0.25, 0.4);
    gllibCylinder(1.50,1.0,10.0);
    glPopMatrix();

//Cabo que segura no teto
    glPushMatrix();
    glColor3f(0.0,0.0,0.0);
    glTranslatef(-0.70, 1.75, 0.07);
    glRotatef(-90.0,0.0,2.0,0.0);
    glScalef(0.2, 0.20, 0.4);
    gllibCylinder(0.2,20.0,10.0);
    glPopMatrix();
}
